﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Zennect.IPC.Jabber;
using System.Threading;

namespace Console___Zennect.IPC {
	class Program {
		const string debugAccount = "scmccart_debug@li5-52.members.linode.com";

		static AutoResetEvent aur;

		static void Main(string[] args) {
			JabberIPC client = new JabberIPC("li5-52.members.linode.com", "scmccart_test", "xiqt0n789");
			aur = new AutoResetEvent(false);

			client.SendMessage<string>(debugAccount, "Woots", (resp) => HandleResponse(resp));
			aur.WaitOne();
		}

		static void HandleResponse(string resp) {
			Console.WriteLine(resp);
			aur.Set();
		}
	}
}
